<?php
use yii\widgets\ActiveForm;
use yii\helpers\Html;
use yii\widgets\LinkPager;
$this->registerJsFile('@web/home/user/js/jquery.min.js',['depends'=>['app\assets\AppAsset']]);
//订单列表
?>
<div class="tpl-content-wrapper">
    <div class="tpl-content-page-title">
        订单列表
    </div>
    <ol class="am-breadcrumb">
        <li><a href="<?php echo \yii\helpers\Url::toRoute(['index/index']);?>" class="am-icon-home">首页</a></li>
        <li><a href="<?php echo \yii\helpers\Url::toRoute(['user/index']);?>">后台</a></li>
        <li class="am-active">订单列表</li>
    </ol>
    <div class="tpl-portlet-components">
        <div class="portlet-title">
            <div class="caption font-green bold">
                <span class="am-icon-code"></span> 订单列表
            </div>
            <div class="tpl-portlet-input tpl-fz-ml">
                <div class="portlet-input input-small input-inline">
                    <div class="input-icon right">
                        <i class="am-icon-search"></i>
                        <input type="text" class="form-control form-control-solid" placeholder="搜索..."></div>
                </div>
            </div>
        </div>

        <div class="tpl-block ">
                <table class="am-table am-table-striped am-table-hover table-main">
                    <thead>
                    <tr>
<!--                        <th class="table-check"><input type="checkbox" class="tpl-table-fz-check"></th>-->
                        <th class="table-title">订单ID</th>
                        <th class="table-title">订单号</th>
                        <th class="table-type">提交时间</th>

                        <th class="table-date am-hide-sm-only">支付情况</th>
                        <th class="table-set">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php foreach ($model as $v):?>
                    <tr>
                        <td><?php echo $v->id;?></td>
                        <td><a class="am-badge am-badge-secondary am-radius" data-am-popover="{content: '<?php echo $v->order_number;?>'}">查看订单号</a></td>
                        <td><?php echo date("Y-m-d",$v->update_time);?></td>
                        <td><?php if($v->is_pay==0)echo "未支付"; else echo "已支付";?></td>
                        <td>
                            <div class="am-btn-toolbar">
                                <a class="am-btn-group am-btn-group-xs">
<!--                                    <a href="">-->
<!--                                        <button class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span>查看</button>-->
<!--                                    </a>-->
                                    <a href="<?php echo \yii\helpers\Url::to(['user/deal-delete','id'=>$v->id]);?>"><button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"><span class="am-icon-trash-o"></span>删除</button></a>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <?php endforeach;?>
                    </tbody>
                </table>
                <div class="am-cf">
                    <div class="am-fr">
                        <ul class="am-pagination tpl-pagination">
                            <?php
                            echo LinkPager::widget([
                                'pagination' => $page,
                                'firstPageLabel' => '首页',
                                'lastPageLabel' => '尾页',
                                'maxButtonCount' => 5,
                                'options' => ['class' => 'am-pagination am-pagination-right'],
                            ]);
                            ?>
                        </ul>
                    </div>
                </div>
                <hr>
        </div>
    </div>
</div>


